package com.qingxin.park.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.hibernate.annotations.GenericGenerator;
/**
 * 名优产品
 * @author Administrator
 *
 */
@Entity
@Table(name = "well_product")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class WellProduct extends com.qingxin.sys.entity.BaseEntity implements
java.io.Serializable{

	private static final long serialVersionUID = -7427951681924270479L;
	
	
	private String productid;//产品id
	private String parkid;//园区id
	private String companyid;//所属企业id
	private String productName;//产品名称
	private String type;//类型  0：名优特色产品 1：有机农产品 2：绿色食品 3：无公害农产品
	private String identification;//产品认证
	private Date identificationTime;//认证时间
	private String introduce;//相关介绍
	private String productImg;//产品图片
	private Date createTime;
	private String createBy;
	private Date updateTime;
	private String updateBy;
	
	private String parkName;
	private String companyName;
	

	public WellProduct(String productid, String parkid, String companyid,
			String productName, String type, String identification,
			Date identificationTime, String introduce, String productImg,
			Date createTime, String createBy, Date updateTime, String updateBy,
			String parkName, String companyName) {
		super();
		this.productid = productid;
		this.parkid = parkid;
		this.companyid = companyid;
		this.productName = productName;
		this.type = type;
		this.identification = identification;
		this.identificationTime = identificationTime;
		this.introduce = introduce;
		this.productImg = productImg;
		this.createTime = createTime;
		this.createBy = createBy;
		this.updateTime = updateTime;
		this.updateBy = updateBy;
		this.parkName = parkName;
		this.companyName = companyName;
	}

	@Transient
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	

	public WellProduct(String productid, String productName,
			Date identificationTime, String introduce, String productImg,
			String parkName) {
		this.productid = productid;
		this.productName = productName;
		this.identificationTime = identificationTime;
		this.introduce = introduce;
		this.productImg = productImg;
		this.parkName = parkName;
	}

	public WellProduct(String productid,String parkid, String companyid,
			String productName, String type,String identification,Date identificationTime,String productImg,String parkName,String companyName) {
		super();
		this.productid = productid;
		this.parkid = parkid;
		this.companyid = companyid;
		this.productName = productName;
		this.type = type;
		this.identification = identification;
		this.identificationTime = identificationTime;
		this.productImg = productImg;
		this.parkName = parkName;
		this.companyName = companyName;
		}
	
	public WellProduct(String productid,String parkid, String companyid,
			String productName, String type,String parkName,String companyName) {
		super();
		this.productid = productid;
		this.parkid = parkid;
		this.companyid = companyid;
		this.productName = productName;
		this.type = type;
		this.parkName = parkName;
		this.companyName = companyName;
		}
	
	@Transient
	public String getParkName() {
		return parkName;
	}

	public void setParkName(String parkName) {
		this.parkName = parkName;
	}

	public WellProduct() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "productid", unique = true, nullable = false, length = 32)
	public String getProductid() {
		return productid;
	}

	public void setProductid(String productid) {
		this.productid = productid;
	}

	@Column(name = "parkid", length = 32)
	public String getParkid() {
		return parkid;
	}

	public void setParkid(String parkid) {
		this.parkid = parkid;
	}
	
	@Column(name = "companyid", length = 32)
	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	} 
	
	@Column(name = "product_name", length = 50)
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Column(name = "type", length = 1)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Column(name = "identification", length = 100)
	public String getIdentification() {
		return identification;
	}

	public void setIdentification(String identification) {
		this.identification = identification;
	}
	
	@Column(name = "identification_time", length = 23)
	public Date getIdentificationTime() {
		return identificationTime;
	}
	
	public void setIdentificationTime(Date identificationTime) {
		this.identificationTime = identificationTime;
	}
	
	@Column(name = "introduce", length = 255)
	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}
	@Column(name = "create_by", length = 32)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 32)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "product_img", length = 100)
	public String getProductImg() {
		return productImg;
	}

	public void setProductImg(String productImg) {
		this.productImg = productImg;
	}
	
}
